package net.sky.oa.test.dao.talkpark;

import java.util.Date;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

import net.sky.oa.dao.talkpark.MailDao;
import net.sky.oa.model.Mail;
import net.sky.oa.model.SysEmployee;
import net.sky.oa.test.BaseTestCase;

public class MailDaoTestCase extends BaseTestCase {
    
	@Resource
	private MailDao maildao;
	
	@Test
	@Rollback(false)
	public void save(){
	 SysEmployee user=new SysEmployee();
	 user.setId(1L);
	 Mail mail=new Mail();
	 mail.setContent("Test");
	 mail.setCopytoids("1,21");
	 mail.setCopytonames("超级管理员,Admin");
	 mail.setFileids("1");
	 mail.setFilenames("x.dll");
	 mail.setImportantflag(2);
	 mail.setRecipientids("1,21");
	 mail.setRecipientnames("超级管理员,Admin");
	 mail.setSender("超级管理员");
	 mail.setSendTime(new Date());
	 mail.setStatus(1);
	 mail.setSubject("Test");
	 mail.setUser(user);
	 this.maildao.save(mail);
	}
}
